#ifndef	__BFX_REFXMLPROCESSINGINSTRUCTION_H__
#define	__BFX_REFXMLPROCESSINGINSTRUCTION_H__

namespace BFX
{

//////////////////////////////////////////////////////////////////////////////

// Represents a processing instruction, which XML defines to keep processor-specific information in the text of the document.
class REFXMLProcessingInstruction : public REFXMLLinkedNode
{
protected:
	friend class REFXMLDocument;
	// This constructor supports the framework infrastructure and is not intended to be used directly from your code. 
	REFXMLProcessingInstruction(const UniString& strTarget, const UniString& strData, REFXMLDocument* pDoc);

public:
	virtual ~REFXMLProcessingInstruction();

	// Gets the name of the node.
	virtual UniString GetName() const;
	// Gets the name of the current node without the namespace prefix.
	virtual UniString GetLocalName() const;

	// Gets or sets the value of the node.
	virtual UniString GetValue() const;
	virtual void SetValue(const UniString& str);

	// Gets the target of the processing instruction.
	UniString GetTarget() const;

	// Gets or sets the concatenated values of the node and all its children.
	virtual UniString GetInnerText() const;
	virtual void SetInnerText(const UniString& str);

	// Gets the type of the current node.
	virtual XMLNodeType GetNodeType() const;

	// Saves the node to the specified XmlWriter.
	virtual void WriteTo(REFXMLWriter* w) const;
	// Saves all the children of the node to the specified XmlWriter.
	virtual void WriteContentTo(REFXMLWriter* w) const;

protected:
	UniString	m_strTarget;
	UniString	m_strData;
};

}	//	namespace BFX

#endif	//	__BFX_REFXMLPROCESSINGINSTRUCTION_H__
